package com.ruoyi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * 启动程序
 *
 * @author ruoyi
 */

@SpringBootApplication
public class RuoYiApplication {

    public static void main(String[] args) {
        System.setProperty("spring.devtools.restart.enabled", "false");

        SpringApplication application = new SpringApplication(RuoYiApplication.class);
        application.setApplicationStartup(new BufferingApplicationStartup(2048));
        ConfigurableApplicationContext applicationContext =  application.run(args);
        Environment env = applicationContext.getEnvironment();
        System.out.println("db.username is :"+env.getProperty("db.username"));
        System.out.println("db.password is :"+env.getProperty("db.password"));
        System.out.println("db.port is :"+env.getProperty("db.port"));
        System.out.println("spring.datasource.druid.master.url is :"+env.getProperty("spring.datasource.druid.master.url"));
        System.out.println("spring.datasource.druid.master.username is :"+env.getProperty("spring.datasource.druid.master.username"));
        System.out.println("spring.datasource.druid.master.password is :"+env.getProperty("spring.datasource.druid.master.password"));
        System.out.println("(♥◠‿◠)ﾉﾞ  RuoYi-Vue-Plus启动成功   ლ(´ڡ`ლ)ﾞ");
    }

}
